Integrand size = 31, antiderivative size = 55 \[ \int \frac {(c-i c \tan (e+f x))^2}{a+i a \tan (e+f x)} \, dx=-\frac {c^2 x}{a}-\frac {i c^2 \log (\cos (e+f x))}{a f}+\frac {2 i c^2}{f (a+i a \tan (e+f x))} \]
[Out]
Time = 0.13 (sec) , antiderivative size = 55, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.097, Rules used = {3603, 3568, 45} \[ \int \frac {(c-i c \tan (e+f x))^2}{a+i a \tan (e+f x)} \, dx=\frac {2 i c^2}{f (a+i a \tan (e+f x))}-\frac {i c^2 \log (\cos (e+f x))}{a f}-\frac {c^2 x}{a} \]
[In]
[Out]
Rule 45
Rule 3568
Rule 3603
Rubi steps \begin{align*} \text {integral}& = \left (a^2 c^2\right ) \int \frac {\sec ^4(e+f x)}{(a+i a \tan (e+f x))^3} \, dx \\ & = -\frac {\left (i c^2\right ) \text {Subst}\left (\int \frac {a-x}{(a+x)^2} \, dx,x,i a \tan (e+f x)\right )}{a f} \\ & = -\frac {\left (i c^2\right ) \text {Subst}\left (\int \left (\frac {1}{-a-x}+\frac {2 a}{(a+x)^2}\right ) \, dx,x,i a \tan (e+f x)\right )}{a f} \\ & = -\frac {c^2 x}{a}-\frac {i c^2 \log (\cos (e+f x))}{a f}+\frac {2 i c^2}{f (a+i a \tan (e+f x))} \\ \end{align*}
Time = 1.38 (sec) , antiderivative size = 47, normalized size of antiderivative = 0.85 \[ \int \frac {(c-i c \tan (e+f x))^2}{a+i a \tan (e+f x)} \, dx=-\frac {i c^2 \left (-\log (i-\tan (e+f x))-\frac {2 a}{a+i a \tan (e+f x)}\right )}{a f} \]
[In]
[Out]
Time = 0.20 (sec) , antiderivative size = 65, normalized size of antiderivative = 1.18
method | result | size |
derivativedivides | \(\frac {i c^{2} \ln \left (1+\tan ^{2}\left (f x +e \right )\right )}{2 f a}-\frac {c^{2} \arctan \left (\tan \left (f x +e \right )\right )}{f a}+\frac {2 c^{2}}{f a \left (\tan \left (f x +e \right )-i\right )}\) | \(65\) |
default | \(\frac {i c^{2} \ln \left (1+\tan ^{2}\left (f x +e \right )\right )}{2 f a}-\frac {c^{2} \arctan \left (\tan \left (f x +e \right )\right )}{f a}+\frac {2 c^{2}}{f a \left (\tan \left (f x +e \right )-i\right )}\) | \(65\) |
risch | \(\frac {i c^{2} {\mathrm e}^{-2 i \left (f x +e \right )}}{a f}-\frac {2 c^{2} x}{a}-\frac {2 c^{2} e}{a f}-\frac {i c^{2} \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )}{a f}\) | \(68\) |
norman | \(\frac {\frac {2 i c^{2}}{a f}-\frac {c^{2} x}{a}+\frac {2 c^{2} \tan \left (f x +e \right )}{a f}-\frac {c^{2} x \left (\tan ^{2}\left (f x +e \right )\right )}{a}}{1+\tan ^{2}\left (f x +e \right )}+\frac {i c^{2} \ln \left (1+\tan ^{2}\left (f x +e \right )\right )}{2 f a}\) | \(94\) |
[In]
[Out]
none
Time = 0.25 (sec) , antiderivative size = 65, normalized size of antiderivative = 1.18 \[ \int \frac {(c-i c \tan (e+f x))^2}{a+i a \tan (e+f x)} \, dx=-\frac {{\left (2 \, c^{2} f x e^{\left (2 i \, f x + 2 i \, e\right )} + i \, c^{2} e^{\left (2 i \, f x + 2 i \, e\right )} \log \left (e^{\left (2 i \, f x + 2 i \, e\right )} + 1\right ) - i \, c^{2}\right )} e^{\left (-2 i \, f x - 2 i \, e\right )}}{a f} \]
[In]
[Out]
Time = 0.18 (sec) , antiderivative size = 100, normalized size of antiderivative = 1.82 \[ \int \frac {(c-i c \tan (e+f x))^2}{a+i a \tan (e+f x)} \, dx=\begin {cases} \frac {i c^{2} e^{- 2 i e} e^{- 2 i f x}}{a f} & \text {for}\: a f e^{2 i e} \neq 0 \\x \left (\frac {2 c^{2}}{a} + \frac {\left (- 2 c^{2} e^{2 i e} + 2 c^{2}\right ) e^{- 2 i e}}{a}\right ) & \text {otherwise} \end {cases} - \frac {2 c^{2} x}{a} - \frac {i c^{2} \log {\left (e^{2 i f x} + e^{- 2 i e} \right )}}{a f} \]
[In]
[Out]
Exception generated. \[ \int \frac {(c-i c \tan (e+f x))^2}{a+i a \tan (e+f x)} \, dx=\text {Exception raised: RuntimeError} \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 119 vs. \(2 (49) = 98\).
Time = 0.40 (sec) , antiderivative size = 119, normalized size of antiderivative = 2.16 \[ \int \frac {(c-i c \tan (e+f x))^2}{a+i a \tan (e+f x)} \, dx=-\frac {\frac {i \, c^{2} \log \left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1\right )}{a} - \frac {2 i \, c^{2} \log \left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - i\right )}{a} + \frac {i \, c^{2} \log \left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1\right )}{a} + \frac {3 i \, c^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 10 \, c^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 3 i \, c^{2}}{a {\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - i\right )}^{2}}}{f} \]
[In]
[Out]
Time = 5.67 (sec) , antiderivative size = 48, normalized size of antiderivative = 0.87 \[ \int \frac {(c-i c \tan (e+f x))^2}{a+i a \tan (e+f x)} \, dx=\frac {c^2\,2{}\mathrm {i}}{a\,f\,\left (1+\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}\right )}+\frac {c^2\,\ln \left (\mathrm {tan}\left (e+f\,x\right )-\mathrm {i}\right )\,1{}\mathrm {i}}{a\,f} \]
[In]
[Out]